package cn.iocoder.yudao.module.iot.controller.admin.device.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.module.iot.enums.DictTypeConstants.IOT_DEVICE_TYPE;
import static cn.iocoder.yudao.module.iot.enums.DictTypeConstants.IOT_NET_STATUS;


@Schema(description = "管理后台 - 设备信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class IotDeviceRespVO {

    @Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32195")
    @ExcelProperty("设备ID")
    private Long id;

    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("设备名称")
    private String name;

    @Schema(description = "设备描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("设备描述")
    private String descript;

    @Schema(description = "设备类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "设备类型", converter = DictConvert.class)
    @DictFormat(IOT_DEVICE_TYPE)
    private Integer type;

    @Schema(description = "设备状态（0 离线 1 在线）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "设备状态（0 离线 1 在线）", converter = DictConvert.class)
    @DictFormat(IOT_NET_STATUS)
    private Integer status;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}